var qqmapsdk, app = getApp(), util = require("../../utils/util.js"), QQMapWX = require("../../utils/qqmap-wx-jssdk.js");

Page({
    data: {
        color: "#34aaff"
    },
    onLoad: function(a) {
        app.setNavigationBarColor(this), console.log(a);
        var n = this;
        app.util.request({
            url: "entry/wxapp/OrderInfo",
            cachetime: "0",
            data: {
                order_id: a.oid
            },
            success: function(a) {
                if ("" != a.data.order.pt_info) {
                    var o = JSON.parse(a.data.order.pt_info);
                    a.data.order.pt_info = o;
                }
                if ("" != a.data.order.dd_info) {
                    var t = JSON.parse(a.data.order.dd_info);
                    a.data.order.dd_info = t;
                }
                if ("" != a.data.order.kfw_info) {
                    var e = JSON.parse(a.data.order.kfw_info);
                    a.data.order.kfw_info = e;
                }
                console.log(a.data, o, t, e), n.setData({
                    odinfo: a.data
                });
            }
        });
    },
    lxqs: function(a) {
        var o = a.currentTarget.dataset.tel;
        wx.makePhoneCall({
            phoneNumber: o
        });
    },
    maketel: function(a) {
        var o = a.currentTarget.dataset.tel;
        wx.makePhoneCall({
            phoneNumber: o
        });
    },
    copyText: function(a) {
        var o = a.currentTarget.dataset.text;
        wx.setClipboardData({
            data: o,
            success: function() {
                wx.showToast({
                    title: "已复制"
                });
            }
        });
    },
    location: function() {
        var a = this.data.odinfo.store.coordinates.split(","), o = this.data.odinfo.store;
        console.log(a), wx.openLocation({
            latitude: parseFloat(a[0]),
            longitude: parseFloat(a[1]),
            address: o.address,
            name: o.name
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});